import {createApp} from 'vue'
import {createPinia} from 'pinia'
import ElementPlus from 'element-plus'
import App from './App.vue'

import MainPage from '@/layout/other/MainPage.vue';
import SvgIcon from '@/components/svg-icon/index.vue';

import router from './router'
import i18n from './locales'
import mate from './mate'

import {auth, hasPermission} from '@/directives/auth'
import {drag} from '@/directives/drag'
import {resize} from '@/directives/resize'

import '@/assets/styles/index.scss'
import '@/assets/icons/font/iconfont.js'
import "uno.css";


const app = createApp(App);
app.config.globalProperties.$auth = hasPermission
//注册组件Pinia，路由，语言，其他
app.use(createPinia()).use(ElementPlus).use(router).use(i18n).use(mate)
//注册指令
app.directive('auth', auth);
app.directive('resize', resize);
app.directive('drag', drag);
//挂载指定组件
app.component('MainPage', MainPage);
app.component('SvgIcon', SvgIcon);
//挂载
app.mount('#app');